<template>
  <div class="con" id = 'home'>
    <div v-for="(item,index) in list" :key="index" @click="goNextPage" style="width:100vw;height:25vw;background:red;margin-bottom:20px;">{{item}}</div>
  </div>
</template>

<script>
  export default {
    name: '',
    data() {
      return {
        list: [1, 2, 3, 4, 5, 6, 7, 8, 9]
      }
    },
    components: {},
    props: [],
    computed: {},
    methods: {
      goNextPage() {
        location.assign('index2.html')
      },
      scrollEvent() {
        this.$route.meta.position = {x:0, y:document.documentElement.scrollTop || document.body.scrollTop}
      }
    },
    beforeDestroy() {
      document.removeEventListener('scroll', this.scrollEvent)
    },
    mounted() {
      document.addEventListener('scroll', this.scrollEvent)
    }
  }
</script>

<style lang='less' scoped>

</style>